home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Format (UK) 188
/
01-04 PC Format 188 [2006-06] DVD side 1_.iso
/
Menus
/
Scenes
/
HOME.dir
/
00049_Script_Link_beh
< prev
next >
Wrap
Text File
|
2006-04-20
|
2KB
|
89 lines
global currentmember,pointclicked,wordnum,wordtext2,wordtext
property Sp
on mouseup me
wordText = currentMember.word[wordNum]
-- put "Clicked word" && wordNum & ", the text" && wordText
if wordtext contains "@" then
-- alert "you clicked email address"&&wordtext
gotonetpage ("mailto:"&wordtext)
else
nothing
end if
if wordtext.char[1..7] = "http://" then
gotonetpage (wordtext)
else
nothing
end if
if wordtext.char[1..8] = "https://" then
gotonetpage (wordtext)
else
nothing
end if
if wordtext.char[1..4] = "www." then
gotonetpage ("http://"&wordtext)
else
nothing
end if
end
on init me
Sp = sprite(me.spritenum)
pFormat()
end
on pFormat me
t = Sp.member
repeat with i = 1 to t.word.count
if t.word[i].char[1..7] = "http://" or t.word[i] contains "@" or t.word[i].char[1..4] = "www." or t.word[i].char[1..8] = "https://" then
t.word[i].color = rgb(20,20,255)
t.word[i].fontstyle = [#plain]
end if
end repeat
end
on mousewithin me
--cursor on
pointClicked = the mouseLoc
currentMember = sprite(me.spriteNum).member
wordNum = sprite(me.spriteNum).pointToWord(pointClicked)
if wordnum <> -1 then
wordText2 = currentMember.word[wordNum]
if wordtext2.char[1..7] = "http://" or wordtext2 contains "@" or wordtext2.char[1..4] = "www." or wordtext2.char[1..8] = "https://"then
cursor 280
else
cursor -1
end if
end if
end
on mouseleave
cursor -1
end